import random
from collections import namedtuple
import time

global frigate_generate_rate
global destroyer_generate_rate
global battleship_generate_rate
global cruiser_generate_rate
global battlecruiser_generate_rate
global dreadnought_generate_rate

frigate_generate_rate =
destroyer_generate_rate =
battleship_generate_rate =
cruiser_generate_rate =
battlecruiser_generate_rate =
dreadnought_generate_rate =


def enemy_generate():
    enemy_sum = random.randint(1, 4)    #总生成数量
    objn = namedtuple('Object_n',
                      ['type',
                       'distance',
                       'capacitor',
                       'shield',
                       'armor',
                       'missile_type',
                       'missil_damage',
                       'misssile_launcher_type',
                       'missile_launcher_speed',
                       'missile_flying_speed'
                       ])
    for n in range(enemy_sum):
        obj = objn(random.choice('frigate', 'destroyer', 'battleship', 'cruiser', 'battlecruiser', 'dreadnought'),
                   random.randint(5, 10)*100
                   )




